<!--header start-->
<style>
#main-content {
    margin-left: 250px;
}
</style>
<link rel="stylesheet" href="/build/style/main.css">
<link rel="stylesheet" href="/build/plugins/element-ui/menu.css">

{% if admin.username == 'googleID' %}
	<div class="slideMenu">
		<div id="headers" class="headers">
			<div class="logo">
				<div class="logo-body">
					<div class="logo-name">Cuckoo</div>
					<div class="logo-text">布谷鸟建站系统2.0</div>
				</div>
			</div>
			<div class="login-info">
				<div class="login-body">
					<div class="login-text">Hi, {{ admin.username }} <a href="index.php?act=logout" class="login-out">注销</a></div>
				</div>
			</div>
		</div>
		<ul class="el-menu el-menu-vertical-demo el-menu--dark">
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="index.php?#/" class="router-link-exact-active router-link-active">
					<div class="item">
						<i class="material-icons">donut_small</i>
					</div>
					<div class="item">首页</div>
				</a>
			</li>
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="index.php?#/products" class="">
					<div class="item">
						<i class="material-icons">extension</i>
					</div>
					<div class="item">所有产品</div>
				</a>
			</li>
		</ul>
	</div>
{% else %}
	<div class="slideMenu">
		<div id="headers" class="headers">
			<div class="logo">
				<div class="logo-body">
					<div class="logo-name">Cuckoo</div>
					<div class="logo-text">布谷鸟建站系统2.0</div>
				</div>
			</div>
			<div class="login-info">
				<div class="login-body">
					<div class="login-text">Hi, {{ admin.username }} <a href="index.php?act=logout" class="login-out">注销</a></div>
				</div>
			</div>
		</div>
		<ul class="el-menu el-menu-vertical-demo el-menu--dark">
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="index.php?#/" class="router-link-exact-active router-link-active">
					<div class="item">
						<i class="material-icons">donut_small</i>
					</div>
					<div class="item">首页</div>
				</a>
			</li>
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="index.php?#/sites" class="">
					<div class="item">
						<i class="material-icons">extension</i>
					</div>
					<div class="item">主页设置</div>
				</a>
			</li>
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="index.php?#/products" class="">
					<div class="item">
						<i class="material-icons">extension</i>
					</div>
					<div class="item">所有产品</div>
				</a>
			</li>
			{% if admin.is_admin == 1 %}
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="index.php?#/orders">
					<div class="item">
						<i class="material-icons">receipt</i>
					</div>
					<div class="item" data-hilite='order'>订单管理</div>
				</a>
			</li>
			{% endif %}
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="index.php?#/comments" class="router-link-exact-active router-link-active">
					<div class="item" data-hilite='comment'>
						<i class="material-icons">speaker_notes</i>
					</div>
					<div class="item">评论管理</div>
				</a>
			</li>
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="country.php" class="router-link-exact-active router-link-active">
					<div class="item">
						<i class="material-icons">monetization_on</i>
					</div>
					<div class="item" data-hilite='currency'>地区管理</div>
				</a>
			</li>
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="index.php?#/currency" class="router-link-exact-active router-link-active">
					<div class="item">
						<i class="material-icons">monetization_on</i>
					</div>
					<div class="item" data-hilite='currency'>货币管理</div>
				</a>
			</li>
			{% if admin.is_admin ==1 %}
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="user.php" data-hilite='manage'>
					<div class="item">
						<i class="material-icons">settings_applications</i>
					</div>
					<div class="item">管理员</div>
				</a>
			</li>
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="userGroup.php" data-hilite='manage'>
					<div class="item">
						<i class="material-icons">settings_applications</i>
					</div>
					<div class="item">用户组</div>
				</a>
			</li>
			<li class="el-menu-item" style="padding-left: 20px;">
				<a href="index.php#/stat" data-hilite='manage'>
					<div class="item">
						<i class="material-icons">receipt</i>
					</div>
					<div class="item">统计数据</div>
				</a>
			</li>
			{% endif %}
		</ul>
	</div>
{% endif%}



<script>
$(function(){
  var items = {"order": "order", "currency": "currency", "comment": "comment"};
  for(let [k, v] of Object.entries(items)){
      if(window.location.href.indexOf(k) > - 1){
          $("[data-hilite='" + v + "']").parents("li").addClass("is-active");
      }
  }
});
</script>

<div class="crouching tiger, hidden dragon">
<header class="header black-bg">
    <div class="sidebar-toggle-box">
        <div class="fa fa-bars tooltips" data-placement="right" data-original-title="Toggle Navigation"></div>
    </div>
    <div class="text-center">
    	<a href="index.php" class="logo">后台管理系统</a>
    </div>
</header>
</div>
<!--header end-->